import md5 from 'js-md5'
let Base64 = require('js-base64').Base64
function confusion (base) {
  let encryptedData = JSON.parse(localStorage.getItem('userInfo'))
  let randomKey = encryptedData.randomKey
  let obj = {}
  let object = Base64.encode(base)
  let sign = md5(object + randomKey)
  obj.object = object
  obj.sign = sign
  let str = JSON.stringify(obj)
  return str
};
export default confusion
